from rest_framework.routers import DefaultRouter
from django.urls import path, include
from .views import UserViewSet, LoginView, RegisterView,SetView

router = DefaultRouter()
router.register(r'users',UserViewSet)
urlpatterns = [
    # 包含路由器生成的 URL 模式
    path('', include(router.urls)),
    # 登录和注册的 URL
    path('login/', LoginView.as_view(), name='login'),
    path('register/', RegisterView.as_view(), name='register'),
    path('todo/', SetView.as_view(), name='set'),
]